/**
 * @Title: UserService.java
 * @Package com.kaver.sso.service
 * @author roc
 * @date Jul 23, 2021 6:22:29 PM
 * @version V1.0
 * @copyright kaver
 */
package com.kaver.sso.service;

import com.kaver.sso.def.req.AddUserReq;
import com.kaver.sso.def.req.LockUserReq;
import com.kaver.sso.def.req.ResetPwdReq;
import com.kaver.sso.def.req.UpdatePwdReq;
import com.kaver.sso.def.req.UpdateUserReq;
import com.kaver.sso.def.req.UserPageListReq;
import com.kaver.sso.def.resp.PageResp;
import com.kaver.sso.def.resp.User;

/**
 * @ClassName: UserService
 * @Description: 用户服务
 * @author roc
 * @date Jul 23, 2021 6:22:29 PM
 */
public interface UserService {

    /**
     * 登陆
     */
    Boolean canLogin(String userAcc);

    /**
     * 登陆
     */
    String login(String userAcc, String pwd, boolean isogeny, boolean ifRemember);

    /**
     * 获取tiket
     */
    String getTicket(User user);
    /**
     * 校验app是否合法
     * */
    boolean checkApp(Long appId, String appSecret);
    /**
     * 票据交换token
     */
    String ticketSwapToken(String ticket);

    /**
     * 添加用户
     */
    void addUser(AddUserReq req);
    /**
     * 修改用户
     * */
    void updateUser(UpdateUserReq req);
    /**
     * 重置用户密码
     * */
    void resetPwd(ResetPwdReq req);
    /**
     * 修改密码
     */
    void updatePwd(UpdatePwdReq req);

    /**
     * 锁定用户
     */
    void lockUser(LockUserReq req);

    /**
     * 解锁用户
     */
    void unlockUser(LockUserReq req);
    /**
     * 判断用户是否是初始密码
     * */
    boolean isUserInitPwd(String userId);
    
    /**
     * 用户分页查询
     */
    PageResp<User> userPageList(UserPageListReq req);
}
